//
//  YLRealNameInformationProgress.m
//  YLFinanceService
//
//  Created by she1323 on 2017/9/4.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLRealNameInformationProgress.h"
#import <Masonry.h>
#import "YLGlobeHeader.h"
@interface YLRealNameInformationProgress ()
@property (weak, nonatomic) UIView *progress;
// 2
@property (weak, nonatomic) IBOutlet UILabel *twoLabel;
// 进度条底部
@property (weak, nonatomic) IBOutlet UIView *progressBaseView;
// 1
@property (weak, nonatomic) IBOutlet UILabel *oneLabel;
// 认证支付
@property (weak, nonatomic) IBOutlet UILabel *payLabel;

@end


@implementation YLRealNameInformationProgress


- (void)next
{
    __weak typeof(self) weakSelf = self;
    [self layoutIfNeeded];
    
    [_progress mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.top.right.left.bottom.mas_equalTo(weakSelf.progressBaseView);
    }];
    
    
    [UIView animateWithDuration:0.35 animations:^{
        [weakSelf layoutIfNeeded];
    } completion:^(BOOL finished) {
        weakSelf.twoLabel.backgroundColor = YLLOrgColor;
        weakSelf.payLabel.textColor = YLColor(30, 30, 30);
    }];
}

 - (void)awakeFromNib
{
    [super awakeFromNib];
    _oneLabel.backgroundColor = YLLOrgColor;
    __weak typeof(self) weakSelf = self;
    
    UIView *progress = [[UIView alloc] init];
    progress.backgroundColor = YLLOrgColor;
    _progress = progress;
    [self addSubview:progress];
    
    [progress mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.bottom.mas_equalTo(weakSelf.progressBaseView);
        make.width.mas_equalTo(0.1);
    }];

}

+ (instancetype)progress
{
    return [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].lastObject;
}

- (void)setUp
{
    
    __weak typeof(self) weakSelf = self;
    UIView *baseView = [[UIView alloc] init];
    [self addSubview:baseView];
    [baseView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(weakSelf);
        make.height.mas_equalTo(40);
        make.left.mas_equalTo(weakSelf).mas_offset(50);
        make.right.mas_equalTo(weakSelf).mas_offset(-50);
    }];
    
    UIView *grayBaseView = [[UIView alloc] init];
    [baseView addSubview:grayBaseView];
    [grayBaseView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_equalTo(grayBaseView);
    }];
    
    UILabel *label1 = [[UILabel alloc] init];
    [baseView addSubview:label1];
}
@end
